﻿@using KPIS.GERP.Models.ICM
@model PurchaseOrderPenalty


@if (ViewContext.RouteData.Values["action"].ToString().ToLower() == "edit") { @Html.HiddenFor(model => model.PoPenId) }
@Html.HiddenFor(model => model.CreatedBy)
@Html.HiddenFor(model => model.CreatedWhen)

@Html.HiddenFor(model => model.UpdatedBy)
@Html.HiddenFor(model => model.UpdatedWhen)

@{
   
    //if (Model != null)
    //{    
    <div class="row-fluid">
        <div class="widget-box">
	        <div class="widget-header header-color-blue2">
                <h4 class="lighter smaller">กำหนดปรับ</h4>
            </div>

        <div class="widget-body">
		    <div class="widget-body-inner">
			    <div class="widget-main">
                   <div class="form-horizontal">
				    <div class="control-group">
					    <div class="control-label">
						    @Html.DisplayNameFor(model => model.Name)
					    </div>
                        <div class="controls"> 
                            @Html.HiddenFor(model => model.PoId)  
                            @Html.EditorFor(model => model.Name)  
                            @Html.Raw("&nbsp<font color=red>*</font>")
						    @Html.ValidationMessageFor(model => model.Name)
					    </div>            
				    </div>
                    <div class="control-group">
				        <div class="control-label">
						        @Html.DisplayNameFor(model => model.Descr)
				        </div>
                        <div class="controls">   
					        @Html.TextAreaFor(model => model.Descr)
					        @Html.ValidationMessageFor(model => model.Descr)
				        </div>            
			        </div>
                    <div class="control-group">
				        <div class="control-label">
						    @Html.DisplayNameFor(model => model.PenaltyRate)
				        </div>
                        <div class="controls">  
                            @{
                                var LookUpService = new KPIS.GERP.WEB.GIMS.IcmMasLookUpService.IcmMasLookUpServiceClient();
                                var rateTypeSelectList = LookUpService.MasLookUpSelectList(KPIS.GERP.Models.ICM.IcmMasLookUpType.LookUpType.PenaltyRateType);	
                             }					
					        @Html.TextAreaFor(model => model.PenaltyRate, new {style="width:60px;height:22px;"})
                            @Html.DropDownListFor(model => model.RateTypeId,rateTypeSelectList)
                           @* @Html.Raw("&nbspต่อวัน&nbsp&nbsp<font color=red>*</font>")*@
					        @Html.ValidationMessageFor(model => model.PenaltyRate)
				        </div>  
                    </div>                  
                   </div>
                </div> 
	        </div> 
        </div> 
        
        </div>
    </div>
    }
@*}*@